-
Notifications
You must be signed in to change notification settings - Fork 70
Fix usagetype parameter autocomplete #156
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@hsato03 can you please check the review comment? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
code lgtm
✅ Build complete for PR #156. 🔗 Download the cmk binaries (expires on August 18, 2025) |
a remark and a question @hsato03 :
|
@hsato03 (cc @winterhazel ) can you update on this? It would be nice to include it in an upcoming release. |
@DaanHoogland did you restart your Management Server(s) after setting
+1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. I tested the autocomplete for usagetype
in the Quota APIs. It is working as intended.
./bin/cmk
Apache CloudStack 🐵 CloudMonkey 6.4.0
Report issues: https://github.com/apache/cloudstack-cloudmonkey/issues
(admin) 🐱 > quota presetvariableslist usagetype=
1 (RUNNING_VM) 2 (ALLOCATED_VM) 3 (IP_ADDRESS) 4 (NETWORK_BYTES_SENT) 5 (NETWORK_BYTES_RECEIVED) 6 (VOLUME)
7 (TEMPLATE) 8 (ISO) 9 (SNAPSHOT) 10 (SECURITY_GROUP) 11 (LOAD_BALANCER_POLICY) 12 (PORT_FORWARDING_RULE)
13 (NETWORK_OFFERING) 14 (VPN_USERS) 21 (VM_DISK_IO_READ) 22 (VM_DISK_IO_WRITE) 23 (VM_DISK_BYTES_READ) 24 (VM_DISK_BYTES_WRITE)
25 (VM_SNAPSHOT) 26 (VOLUME_SECONDARY) 27 (VM_SNAPSHOT_ON_PRIMARY) 28 (BACKUP) 29 (BUCKET) 30 (NETWORK)
31 (VPC)
@hsato03 @DaanHoogland regarding the completion for type
in listUsageRecords
, I think that we can address it separately, as this issue is not exclusive to usage type completion. Other APIs that have the type
parameter are not completed either, even though some of them have APIs that return the possible values. listAlerts
is an example.
right ,
I did not mean to say in this PR but yes other type parameters (or other enum values) suffer the same.
I had restarted after enabling the usage service but not the. quota service :doh:. Tested it with cc @shwstppr |
* Fix usage type autocomplete --------- Co-authored-by: Henrique Sato <[email protected]>
Currently, when using autocomplete in the
usagetype
parameter (present in APIs such asquotaPresetVariableList
andquotaCreateTariff
) the CLI panics.This PR aims to fix this bug and allow users to use the completer for the
usagetype
parameter.